package com.globallogic.university.events;

import com.globallogic.university.people.StudentGroup;
import com.globallogic.university.people.Teacher;
import com.globallogic.university.subject.Subject;
import com.globallogic.university.venues.Auditorium;

/**
 * Class represents a seminar
 * 
 * @author vladyslav.bachurin
 *
 */
public class Seminar extends Event {
	

	public Seminar() {
		super();
	}

	public Seminar(StudentGroup group, DaysOfWeek dayOfWeek,
			Integer timeSlotNumber, Auditorium auditorium, Subject subject,
			Teacher lecturer) {
		super(group, dayOfWeek, timeSlotNumber, auditorium, subject, lecturer);
	}

	private String homeTask;

	@Override
	public String toString() {
		return "Seminar: " + super.toString();
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result
				+ ((homeTask == null) ? 0 : homeTask.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		Seminar other = (Seminar) obj;
		if (homeTask == null) {
			if (other.homeTask != null)
				return false;
		} else if (!homeTask.equals(other.homeTask))
			return false;
		return true;
	}

	public String getHomeTask() {
		return homeTask;
	}

	public void setHomeTask(String homeTask) {
		this.homeTask = homeTask;
	}

}
